#include <HMI/Cli.hpp>


void Cli::init(){

}

void Cli::printWelcome(){

	std::cout << "Welcome to NetCalc client!" << std::endl;

}

void Cli::printParameter(Config &config){

	std::cout << "---------------------------------" << std::endl;
	std::cout << "Connection details:" << std::endl;
	std::cout << " -Address:\t" << config.getAddress6() << std::endl;
	std::cout << " -Port:\t\t" << config.getPort() << std::endl;
	std::cout << " -Using:\tIPv";
	if(config.isIPv6Flag()){
		std::cout << "6" << std::endl;
	}else{
		std::cout << "4" << std::endl;
	}
	std::cout << "---------------------------------" << std::endl;

}

void Cli::printPrompt(){

	std::cout << "client:> ";

}

void Cli::printFormatError(){

	std::cout << "\tError: Wrong format!" << std::endl;

}

void Cli::printConnectionError(){

	std::cout << "Error: Connection refused!" << std::endl;

}

void Cli::printConnectionEstablished(){

	std::cout << "Success: Connection established!" << std::endl;

}


void Cli::printSend(std::string &str){
	std::cout << "\tSent: " << str << std::endl;
}

void Cli::printResult(std::string &str){
	std::cout << "\tResult: " << str << std::endl;
}



void Cli::readLine(std::string &line){
	std::cin >> line;
}

void Cli::receiveCallback(std:: string& data){

	std::cout << data << std::endl;

}
